<!DOCTYPE HTML>
<!--
 * @author Nicolas CARPi <nico-git@deltablot.email>
 * @copyright 2012 Nicolas CARPi
 * @see https://www.elabftw.net Official website
 * @license AGPL-3.0
 * @package elabftw
-->
<html lang='{{ App.getLang()|slice(0, 2) }}'>

<head>
  <meta http-equiv='Content-type' content='text/html;charset=UTF-8' />
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <meta name='description' content='Electronic lab notebook - eLabFTW'>
  {% if App.Config.configArr.autologout_time != '0' %}
    <meta http-equiv='refresh' content='{{ App.Config.configArr.autologout_time }};url=app/logout.php' />
  {% endif %}
  <meta name='csrf-token' content='{{ App.Session.get('csrf') }}'/>
  <link rel='manifest' href='/manifest.webmanifest' crossorigin='use-credentials'>
  <link rel='icon' href='/assets/images/favicon.ico' sizes='any'>{# 32×32 #}
  <link rel='icon' href='/assets/images/favicon.svg' type='image/svg+xml'>
  <link rel='apple-touch-icon' href='/assets/images/apple-touch-icon.png'>{# 180×180 #}

  <title>{{ Entity.entityData.title|default(pageTitle) }} - eLabFTW</title>
  {# see builder.js to see what gets inside these files #}
  {# CSS #}
  <link rel='stylesheet' media='all' href='/assets/vendor.min.css?v={{ v }}' />
  <link rel='stylesheet' media='all' href='/assets/elabftw.min.css?v={{ v }}' />

  {# all js dependencies bundled by webpack (see builder.js) #}
  <script defer src='/assets/vendor.bundle.js?v={{ v }}'></script>
  {# the main JS bundle with all the elabftw TS code (see builder.js) #}
  <script defer src='/assets/main.bundle.js?v={{ v }}'></script>
</head>

<body>
{# skip link for accessibility: RGAA 4.0 12.7 link goes to content directly, skipping menu/header/nav #}
<a class='sr-only' aria-label='{{ 'Skip to content'|trans }}' href='#content-start'></a>
{# when this disappears from the viewport, scroll to top button appears #}
<div id='scrollTopBtnAnchor'></div>

{# container-fluid is from bootstrap #}
<div id='container' class='container-fluid'>

{# begin main menu #}
<nav aria-label='{{ 'Main menu'|trans }}' class='navbar navbar-expand-lg navbar-dark'>
    {% if App.Session.has('is_auth') %}
    {# hamburger menu #}
    <button class='navbar-toggler' type='button' data-toggle='collapse' data-target='#main-nav' aria-controls='main-nav' aria-expanded='false' aria-label='{{ 'Toggle navigation'|trans }}'>
        <span class='navbar-toggler-icon'></span>
    </button>
    {% endif %}
    {# logo #}
    <a href='dashboard.php' title='{{ 'Go to dashboard'|trans }}'><img class='navbar-brand d-xs-none d-sm-none d-lg-none d-xl-block' src='assets/images/logo-header.svg' width='110' height='40' alt='elabftw logo' /></a>

    {% if App.Session.has('is_auth') %}
    {# everything in there will be part of the burger #}
    <div class='collapse navbar-collapse' id='main-nav'>
        <div class='navbar-nav'>
            <a aria-label='{{ 'Go to dashboard'|trans }}' class='nav-item nav-link {{ scriptName == 'dashboard.php' ? 'active' }}'
                href='dashboard.php' title='{{ 'Go to dashboard'|trans }}'><i class='fas fa-house'></i></a>
            <div class='nav-item dropdown'>
              {% if App.devMode -%}
                <!-- [html-validate-disable-next prefer-native-element: using a button here will mess up the navbar] -->
              {%- endif %}
              <div class='nav-link dropdown-toggle {{ scriptName == 'experiments.php' or scriptName == 'templates.php' or scriptName == 'experiments-categories.php' or scriptName == 'experiments-status.php' ? 'active' }}' role='button' data-toggle='dropdown' aria-expanded='false'>
              {% trans %}Experiment{% plural 2 %}Experiments{% endtrans %}
              </div>
              <div class='dropdown-menu'>
                <form class='dropdown-item form-inline' action='experiments.php' aria-label='{{ 'Quick search experiments'|trans }}'>
                  <label for='nav-search-experiments' class='sr-only'>{{ 'Search experiments'|trans }}</label>
                  <div class='input-group'>
                    <input id='nav-search-experiments' class='form-control' type='search' name='q' placeholder='{{ 'Search'|trans }}' aria-label='{{ 'Search'|trans }}' />
                    <div class='input-group-append'>
                      <button type='submit' class='btn btn-sm btn-primary' aria-label='{{ 'Search'|trans }}'><i class='fas fa-magnifying-glass color-white' aria-hidden='true'></i></button>
                    </div>
                  </div>
                </form>
                {% set isActive = scriptName == 'experiments.php' and App.Request.query.get('scope') == 1 %}
                <a class='dropdown-item {{ isActive ? 'active' }}' href='experiments.php?scope=1' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-user fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'My experiments'|trans }}</a>
                {% set isActive = scriptName == 'experiments.php' and App.Request.query.get('scope') == 2 %}
                <a class='dropdown-item {{ isActive ? 'active' }}' href='experiments.php?scope=2' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-users fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'Team experiments'|trans }}</a>
                {% set isActive = scriptName == 'experiments.php' and App.Request.query.get('scope') == 3 %}
                <a class='dropdown-item {{ isActive ? 'active' }}' href='experiments.php?scope=3' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-globe fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'All experiments'|trans }}</a>
                <div class='dropdown-divider'></div>
                {% for entity in App.experimentsCategoryArr %}
                  {% set isActive = scriptName == 'experiments.php' and App.Request.query.get('category') == entity.id %}
                  <a class='dropdown-item {{ isActive ? 'active' }}' href='experiments.php?category={{ entity.id }}' {{ isActive ? 'aria-current="page"' }}><span class='round-spot mr-1' style='background-color: #{{ entity.color }}'></span>{{ entity.title }}</a>
                {% endfor %}
                <div class='dropdown-divider'></div>
                {% set isActive = scriptName == 'templates.php' %}
                <a class='dropdown-item {{ isActive ? 'active' }}' href='templates.php' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-copy fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'Experiment templates'|trans }}</a>
                {% set isActive = scriptName == 'experiments-categories.php' %}
                <a class='dropdown-item {{ isActive ? 'active' }} {{ not App.Teams.teamArr.users_canwrite_experiments_categories and not App.Users.isAdmin ? 'disabled' }}' href='experiments-categories.php' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-rectangle-list fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'Experiment categories'|trans }}</a>
                {% set isActive = scriptName == 'experiments-status.php' %}
                <a class='dropdown-item {{ isActive ? 'active' }} {{ not App.Teams.teamArr.users_canwrite_experiments_status and not App.Users.isAdmin ? 'disabled' }}' href='experiments-status.php' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-list-check fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'Experiment status'|trans }}</a>
              </div>
            </div>
            <div class='nav-item dropdown'>
              {% if App.devMode -%}
                <!-- [html-validate-disable-next prefer-native-element: using a button here will mess up the navbar] -->
              {%- endif %}
              <div class='nav-link dropdown-toggle {{ scriptName == 'database.php' or scriptName == 'resources-templates.php' or scriptName == 'resources-categories.php' or scriptName == 'resources-status.php' ? 'active' }}' role='button' data-toggle='dropdown' aria-expanded='false'>
                {{ 'Resources'|trans }}
              </div>
              <div class='dropdown-menu'>
                <form class='dropdown-item form-inline' action='database.php' aria-label='{{ 'Quick search resources'|trans }}'>
                  <label for='nav-search-resources' class='sr-only'>{{ 'Search resources'|trans }}</label>
                  <div class='input-group'>
                    <input id='nav-search-resources' class='form-control' type='search' name='q' placeholder='{{ 'Search'|trans }}' />
                    <div class='input-group-append'>
                      <button type='submit' class='btn btn-sm btn-primary' aria-label='{{ 'Search'|trans }}'><i class='fas fa-magnifying-glass color-white' aria-hidden='true'></i></button>
                    </div>
                  </div>
                </form>
                {% set isActive = scriptName == 'database.php' and App.Request.query.get('scope') == 1 %}
                <a class='dropdown-item {{ isActive ? 'active' }}' href='database.php?scope=1' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-user fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'My resources'|trans }}</a>
                {% set isActive = scriptName == 'database.php' and App.Request.query.get('scope') == 2 %}
                <a class='dropdown-item {{ isActive ? 'active' }}' href='database.php?scope=2' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-users fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'Team resources'|trans }}</a>
                {% set isActive = scriptName == 'database.php' and App.Request.query.get('scope') == 3 %}
                <a class='dropdown-item {{ isActive ? 'active' }}' href='database.php?scope=3' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-globe fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'All resources'|trans }}</a>
                {% set isActive = scriptName == 'database.php' and App.Request.query.get('bookable') == 1 %}
                <a class='dropdown-item {{ isActive ? 'active' }}' href='database.php?bookable=1' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-calendar-check fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'Bookable resources'|trans }}</a>
                <div class='dropdown-divider'></div>
                {% for entity in App.itemsCategoryArr %}
                  {% set isActive = scriptName == 'database.php' and App.Request.query.get('category') == entity.id %}
                  <a class='dropdown-item {{ isActive ? 'active' }}' href='database.php?category={{ entity.id }}' {{ isActive ? 'aria-current="page"' }}><span class='round-spot mr-1' style='background-color: #{{ entity.color }}'></span>{{ entity.title }}</a>
                {% endfor %}
                <div class='dropdown-divider'></div>
                {% set isActive = scriptName == 'resources-templates.php' %}
                <a class='dropdown-item {{ isActive ? 'active' }}' href='resources-templates.php' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-copy fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'Resource templates'|trans }}</a>
                {% set isActive = scriptName == 'resources-categories.php' %}
                <a class='dropdown-item {{ isActive ? 'active' }}' href='resources-categories.php' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-rectangle-list fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'Resource categories'|trans }}</a>
                {% set isActive = scriptName == 'resources-status.php' %}
                <a class='dropdown-item {{ isActive ? 'active' }} {{ not App.Teams.teamArr.users_canwrite_resources_status and not App.Users.isAdmin ? 'disabled' }}' href='resources-status.php' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-list-check fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'Resource status'|trans }}</a>
              </div>
            </div>
            {% set isActive = scriptName == 'scheduler.php' %}
            <a class='nav-item nav-link {{ isActive ? 'active' }}'
                href='scheduler.php' {{ isActive ? 'aria-current="page"' }}>{{ 'Scheduler'|trans }}</a>

            {% if not App.Session.has('is_anon') %}
            {% set isActive = scriptName == 'team.php' %}
            <a class='nav-item nav-link {{ isActive ? 'active' }}'
                href='team.php' {{ isActive ? 'aria-current="page"' }}>{{ 'Team'|trans }}</a>
            {% endif %}

            <div class='nav-item dropdown'>
              {% if App.devMode -%}
                <!-- [html-validate-disable-next prefer-native-element: using a button here will mess up the navbar] -->
              {%- endif %}
              <div class='nav-link dropdown-toggle' role='button' data-toggle='dropdown' aria-expanded='false'>
              {{ 'Tools'|trans }}
              </div>
              <div class='dropdown-menu'>
                {% set isActive = scriptName == 'compounds.php' %}
                <a class='dropdown-item {{ isActive ? 'active' }}' href='compounds.php' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-flask fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'Compounds'|trans }}</a>
                {% set isActive = scriptName == 'chem-editor.php' %}
                <a class='dropdown-item {{ isActive ? 'active' }}' href='chem-editor.php' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-pen-to-square fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'Chemical Structure Editor'|trans }}</a>
                {% set isActive = scriptName == 'syc.php' %}
                <a class='dropdown-item {{ not envAsBool('USE_OPENCLONING') ? 'disabled' }} {{ isActive ? 'active' }}' href='syc.php' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-dna fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'OpenCloning'|trans }}</a>
                {% set isActive = scriptName == 'inventory.php' %}
                <a class='dropdown-item {{ isActive ? 'active' }}' href='inventory.php' {{ isActive ? 'aria-current="page"' }}><i class='fas fa-warehouse fa-fw mr-1 {{ isActive ? 'color-white' }}'></i>{{ 'Inventory'|trans }}</a>
              </div>
            </div>
        </div>

        {# Notification bell #}
        {% if App.Session.has('is_auth') and not App.Session.has('is_anon') %}
        <div class='nav-item dropdown ml-auto' id='navbarNotifDiv'>
          <button class='btn nav-link' id='navbarNotifDropdown' type='button' aria-label='{{ 'Notifications'|trans }}' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'><i class='far fa-bell fa-2x {{ App.notifsArr|filter(n => n.is_ack == 0)|length ? 'active' }}'></i></button>
          <div class='dropdown-menu dropdown-menu-right' id='navbar-notif-dropdown' aria-labelledby='navbarNotifDropdown'><span class='dropdown-header'>{{ 'Notifications'|trans }}</span>
            {% if App.notifsArr %}
              {% for notif in App.notifsArr %}
                <div class='notification p-3' data-ack='{{ notif.is_ack }}'>{{ notif|notifWeb }}</div>
              {% endfor %}
              <div class='dropdown-divider'></div>
              <a class='dropdown-item hover-danger' href='#' data-userid='{{ App.Users.userData.userid }}' data-action='destroy-notif'><i class='fas fa-trash-alt fa-fw' title='{{ 'Clear all'|trans }}'></i> {{ 'Clear all'|trans }}</a>
            {% else %}
              <div class='notification p-3'>{{ 'No new notifications to show.'|trans }}</div>
              <div class='dropdown-divider'></div>
            {% endif %}
            <a href='/ucp.php?tab=4' class='dropdown-item'><i class='fas fa-cogs fa-fw'></i> {{ 'Notifications settings'|trans }}</a>
          </div>
        </div>
        {% endif %}

        {# Help/Community dropdown #}
        <div class='nav-item dropdown {{ App.Session.has('is_anon') ? 'ml-auto' }}'>
          <button class='btn nav-link border-0' id='navbarDropdownHelp' type='button' aria-label='{{ 'Help menu'|trans }}' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'><i class='fas fa-circle-question fa-2x'></i></button>
          <div class='dropdown-menu dropdown-menu-right' aria-labelledby='navbarDropdownHelp'>
            <a class='dropdown-item' href='{{ App.getWhatsnewLink(constant('Elabftw\\Elabftw\\App::INSTALLED_VERSION_INT')) }}' target='_blank' rel='noopener'><i class='fas fa-newspaper fa-fw'></i> {{ "What's new"|trans }}</a>
            <a class='dropdown-item' href='https://doc.elabftw.net' target='_blank' rel='noopener'><i class='fas fa-book fa-fw'></i> {{ 'Documentation'|trans }}</a>
            <a class='dropdown-item' href='https://doc.elabftw.net/api.html' target='_blank' rel='noopener'><i class='fas fa-book fa-fw'></i> API {{ 'Documentation'|trans }}</a>
            <a class='dropdown-item' href='{{ App.Config.configArr.support_url }}' target='_blank' rel='noopener'><i class='fas fa-bell-concierge fa-fw'></i> {{ 'Support'|trans }}</a>
            <a class='dropdown-item' href='https://github.com/elabftw/elabftw/discussions/' target='_blank' rel='noopener'><i class='fas fa-comments fa-fw'></i> {{ 'Community forum'|trans }}</a>
            <a class='dropdown-item' href='{{ App.Config.configArr.chat_url }}' target='_blank' rel='noopener'><i class='fas fa-comment-dots fa-fw'></i> {{ 'Chat room'|trans }}</a>
            <div class='dropdown-divider'></div>
            <a class='dropdown-item' href='https://github.com/elabftw/elabftw/issues/new/choose' target='_blank' rel='noopener'><i class='fas fa-bug fa-fw'></i> {{ 'Submit feedback'|trans }}</a>
            <a class='dropdown-item' href='https://doc.elabftw.net/contributing.html' target='_blank' rel='noopener'><i class='fas fa-handshake-angle fa-fw'></i> {{ 'Contribute to eLabFTW'|trans }}</a>
            <div class='dropdown-divider'></div>
            <a class='dropdown-item' data-action='toggle-modal' data-target='aboutElabftwModal'><i class='fas fa-circle-info fa-fw'></i> {{ 'About eLabFTW'|trans }}</a>
          </div>
        </div>

        {# User dropdown #}
        <div class='nav-item dropdown'>
          <button class='btn nav-link border-0' id='navbarDropdown' type='button' aria-label='{{ 'User menu'|trans }}' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'><span class='initials'>{{ App.Users.userData.initials }}</span></button>
          <div class='dropdown-menu dropdown-menu-right' aria-labelledby='navbarDropdown'><h6 class='dropdown-header'>{{ 'Logged in as %s in:'|trans|format(App.Users.userData.firstname|default('Anonymous')) }}<br>{{ App.Teams.teamArr.name }}</h6>
            {% if App.Users.userData.teams|default([])|length > 1 %}
              <a href='login.php?switch_team=1' class='dropdown-item'><i class='fas fa-repeat fa-fw'></i> {{ 'Switch team'|trans }}</a>
            {% endif %}
            <div class='dropdown-divider'></div>
            {% if App.Session.has('is_auth') and not App.Session.has('is_anon') %}
              <a class='dropdown-item' href='/dashboard.php'><i class='fas fa-table-columns fa-fw'></i> {{ 'Dashboard'|trans }}</a>
              <a class='dropdown-item' href='/profile.php'><i class='fas fa-user fa-fw'></i> {{ 'My profile'|trans }}</a>
              <a class='dropdown-item' data-action='toggle-sidepanel' data-target='todolist' href='#' aria-controls='todolistPanel'><i class='fas fa-list fa-fw'></i> {{ 'Todolist'|trans }}</a>
              <a class='dropdown-item' href='/profile.php?tab=3'><i class='fas fa-file-arrow-up fa-fw'></i> {{ 'Import'|trans }}</a>
              <a class='dropdown-item' href='/profile.php?tab=4'><i class='fas fa-file-arrow-down fa-fw'></i> {{ 'Export'|trans }}</a>
              <a class='dropdown-item' href='/ucp.php'><i class='fas fa-cogs fa-fw'></i> {{ 'Settings'|trans }}</a>
              {% if App.Users.isAdmin %}
                <a class='dropdown-item' href='admin.php'><i class='fas fa-tools fa-fw'></i> {{ 'Admin panel'|trans }}</a>
              {% endif %}
              {% if App.Users.userData.is_sysadmin %}
                <a class='dropdown-item' href='sysconfig.php'><i class='fas fa-tools fa-fw' style='color:#e6614c'></i> {{ 'Sysadmin panel'|trans }}</a>
              {% endif %}

            {% endif %}
            <div class='dropdown-divider'></div>
            <a class='dropdown-item' href='#' data-action='logout'><i class='fas fa-sign-out-alt fa-fw'></i> {{ 'Logout'|trans }}</a>
          </div>
        </div>
     </div>
  {% else %} {# not auth #}
    <div class='nav-item ml-auto'>
      <a href='#' class='color-white hl-hover-gray p-2 rounded' data-action='toggle-modal' data-target='selectLanguageModal'>
        <i title='Select language' class='fas fa-language fa-lg color-white mr-2'></i>{{ 'Select language'|trans }}
      </a>
    </div>
  {% endif %}
</nav>

{# SHOW FAVTAGS/TODOLIST PANELS #}
{% if App.Session.has('is_auth') and not App.Session.has('is_anon') %}
  <div class='pr-2 mt-3 float-left' id='sidepanel-buttons'>
    <div class='bounce-right sidepanel-btn sidepanel-closed' id='favtagsPanelOpener' data-action='toggle-sidepanel' data-target='favtags' aria-controls='favtagsPanel' title='{{ 'Toggle favorite tags'|trans }}'>
      <i class='fas fa-folder-tree'></i>
    </div>
    <div class='mt-3 bounce-right sidepanel-btn sidepanel-closed' id='todolistPanelOpener' data-action='toggle-sidepanel' data-target='todolist' aria-controls='todolistPanel' title='{{ 'Toggle todolist'|trans }}'>
      <i class='fas fa-list-check'></i>
    </div>
  </div>
{% endif %}

<div class='real-container'>

{# TEMPORARY notice for deprecation of open_science #}
{% if App.Config.configArr.open_science == '1' %}
{{ 'You are using a deprecated configuration option "open science". Please read <a target="_blank" href="https://github.com/elabftw/elabftw/discussions/6164">this Discussion</a>.'|msg('ko') }}
{% endif %}
{# END TEMPORARY notice for deprecation of open_science #}

<noscript>{# show warning if javascript is disabled #}
    <div class='alert alert-danger'>
        <p class='font-weight-bold'>Javascript is disabled. Please enable Javascript to view eLabFTW in all its glory.</p>
    </div>
</noscript>
